# ------------------------------------------
# Monit configuration file for Nginx
# ------------------------------------------

check process nginx with pidfile /var/run/nginx.pid
  start program = "/etc/init.d/nginx start" with timeout 60 seconds
  stop program  = "/etc/init.d/nginx stop"
  if cpu > 90% for 15 cycles then alert
  if totalmem > 90% for 15 cycles then alert
  if loadavg(15min) greater than 10 for 50 cycles then alert
  group nginx
